package pers.liyan.shi.manager.common;

/**
 * @author ShiLY
 * @version 1.0
 * @date 2020/2/10 23:14
 */
public class Result {

    private Integer code;
    private String message;

    public static Result ok() {
        Result result = new Result();
        result.setCode(0);
        return result;
    }

    public static Result fail(String message) {
        Result result = new Result();
        result.setCode(-1);
        result.setMessage(message);
        return result;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
